<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的拓展-assgin</title>
    <script>
        let user1 = {
            id: 10000,
            name: "zuy"
        };
        let user2 = {
            id: 10010,
            age: 50
        };
        let user3 = {
            age: 60,
            address: "浦东航头"
        };
        //把 source中的属性和值一次赋值给target，
        //属性存在，就覆盖值。属性不存在，就添加。
        //第一个就是target，后面的就是source
        Object.assign(user1, user2, user3);
        console.log(user1);
        console.log(user2);
        console.log(user3);


    </script>
</head>
<body>

</body>
</html>